home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form FormKnob
- BorderStyle = 1 'Fixed Single
- Caption = "Knob Properties Example"
- ClientHeight = 4080
- ClientLeft = 1500
- ClientTop = 4065
- ClientWidth = 8445
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- ForeColor = &H80000008&
- Height = 4485
- Left = 1440
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 4080
- ScaleWidth = 8445
- Top = 3720
- Width = 8565
- Begin VB.Frame Frame6
- Caption = "Knob Tick"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 2055
- Left = 6030
- TabIndex = 22
- Top = 60
- Width = 2355
- Begin VB.CommandButton CmdTickCaptionColor
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Knob Tick Caption Color"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 120
- TabIndex = 0
- Top = 1560
- Width = 2115
- End
- Begin VB.HScrollBar HScrollTickWidth
- Height = 255
- LargeChange = 5
- Left = 660
- Max = 10
- TabIndex = 1
- Top = 240
- Value = 2
- Width = 1575
- End
- Begin VB.CommandButton CmdTickColor
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Knob Tick Color"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 120
- TabIndex = 2
- Top = 1200
- Width = 2115
- End
- Begin VB.HScrollBar HScrollTickLength
- Height = 255
- LargeChange = 5
- Left = 660
- Max = 20
- TabIndex = 24
- Top = 540
- Value = 8
- Width = 1575
- End
- Begin VB.HScrollBar HScrollTickGap
- Height = 255
- LargeChange = 5
- Left = 660
- Max = 10
- Min = 1
- TabIndex = 23
- Top = 840
- Value = 2
- Width = 1575
- End
- Begin VB.Label Label1
- Caption = "Width"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 3
- Top = 240
- Width = 495
- End
- Begin VB.Label Label2
- Caption = "Length"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 16
- Top = 540
- Width = 495
- End
- Begin VB.Label Label4
- Caption = "Gap"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 120
- TabIndex = 17
- Top = 840
- Width = 495
- End
- End
- Begin VB.Frame Frame5
- Caption = "Knob Bevel"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 675
- Left = 6030
- TabIndex = 14
- Top = 2490
- Width = 2355
- Begin VB.HScrollBar HScrollBevelWidth
- Height = 255
- LargeChange = 5
- Left = 120
- Max = 10
- TabIndex = 15
- Top = 300
- Value = 2
- Width = 2115
- End
- End
- Begin VB.Frame Frame4
- Caption = "MIDI CoolTools Knob"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 3135
- Left = 2520
- TabIndex = 13
- Top = 60
- Width = 3435
- Begin KnobLib.Knob Knob1
- Height = 2775
- Left = 120
- TabIndex = 27
- Top = 240
- Width = 3255
- _Version = 65537
- _ExtentX = 5741
- _ExtentY = 4895
- _StockProps = 69
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- BevelWidth = 2
- BorderWidth = 5
- Indicator = 0
- IndicatorColor = 255
- IndicatorWidth = 1
- KnobColor = -2147483633
- KnobStyle = 1
- Radius = 285
- TickCaptionColor= 0
- TickColor = 0
- TickCount = 3
- TickGap = 2
- TickLength = 8
- TickWidth = 1
- Value = 0
- Max = 100
- Min = 0
- TickCaption = ""
- End
- End
- Begin VB.Frame Frame3
- Caption = "Knob Style"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1635
- Left = 60
- TabIndex = 10
- Top = 60
- Width = 2385
- Begin VB.OptionButton OptionKnobStyle
- Caption = "Textured"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 3
- Left = 1140
- TabIndex = 18
- Top = 540
- Width = 1000
- End
- Begin VB.OptionButton OptionKnobStyle
- Caption = "Lowered"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 2
- Left = 150
- TabIndex = 19
- Top = 540
- Width = 915
- End
- Begin VB.OptionButton OptionKnobStyle
- Caption = "Raised"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 1
- Left = 1140
- TabIndex = 20
- Top = 300
- Value = -1 'True
- Width = 915
- End
- Begin VB.OptionButton OptionKnobStyle
- Caption = "Circle"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 195
- Index = 0
- Left = 150
- TabIndex = 21
- Top = 300
- Width = 915
- End
- Begin VB.CommandButton CmdKnobColor
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Knob Color"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 150
- TabIndex = 12
- Top = 810
- Width = 2115
- End
- Begin VB.CommandButton CmdKnobBckGrdColor
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Knob Back Ground Color"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 150
- TabIndex = 11
- Top = 1170
- Width = 2115
- End
- End
- Begin VB.Frame Frame2
- Caption = "Knob Indicator"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 1455
- Left = 60
- TabIndex = 6
- Top = 1740
- Width = 2385
- Begin VB.OptionButton OptionIndicator
- Caption = "Line"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 225
- Index = 1
- Left = 1320
- TabIndex = 26
- Top = 300
- Width = 825
- End
- Begin VB.OptionButton OptionIndicator
- Caption = "Spot"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 225
- Index = 0
- Left = 180
- TabIndex = 25
- Top = 300
- Value = -1 'True
- Width = 825
- End
- Begin VB.CommandButton CmdKnobIndicatorColor
- Appearance = 0 'Flat
- BackColor = &H80000005&
- Caption = "Knob Indicator Color"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 90
- TabIndex = 8
- Top = 1020
- Width = 2115
- End
- Begin VB.HScrollBar HScrollIndicatorWidth
- Enabled = 0 'False
- Height = 255
- LargeChange = 2
- Left = 630
- Max = 7
- Min = 1
- TabIndex = 7
- Top = 660
- Value = 1
- Width = 1575
- End
- Begin VB.Label Label3
- Caption = "Width"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 90
- TabIndex = 9
- Top = 660
- Width = 495
- End
- End
- Begin VB.Frame Frame1
- Caption = "Knob Radius"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 675
- Left = 60
- TabIndex = 4
- Top = 3270
- Width = 8355
- Begin VB.HScrollBar HScrollRadius
- Height = 255
- LargeChange = 50
- Left = 90
- Max = 950
- Min = 140
- SmallChange = 10
- TabIndex = 5
- Top = 300
- Value = 300
- Width = 8175
- End
- End
- Begin MSComDlg.CommonDialog CMDialog1
- Left = 240
- Top = 4230
- _Version = 65536
- _ExtentX = 847
- _ExtentY = 847
- _StockProps = 0
- End
- Attribute VB_Name = "FormKnob"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Private Sub CmdKnobBckGrdColor_Click()
- '
- ' Load the control with the current (or last selected) shapes
- ' FillColor
- '
- CMDialog1.Color = KNOB1.BackColor
- '
- ' Execute the color select dialog
- '
- CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
- CMDialog1.Action = DLG_COLOR
- '
- ' Assign the selected color to the shape's color properties
- '
- KNOB1.BackColor = CMDialog1.Color
- End Sub
- Private Sub CmdKnobColor_Click()
- '
- ' Load the control with the current (or last selected) shapes
- ' FillColor
- '
- CMDialog1.Color = KNOB1.KnobColor
- '
- ' Execute the color select dialog
- '
- CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
- CMDialog1.Action = DLG_COLOR
- '
- ' Assign the selected color to the shape's color properties
- '
- KNOB1.KnobColor = CMDialog1.Color
- End Sub
- Private Sub CmdKnobIndicatorColor_Click()
- '
- ' Load the control with the current (or last selected) shapes
- ' FillColor
- '
- CMDialog1.Color = KNOB1.IndicatorColor
- '
- ' Execute the color select dialog
- '
- CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
- CMDialog1.Action = DLG_COLOR
- '
- ' Assign the selected color to the shape's color properties
- '
- KNOB1.IndicatorColor = CMDialog1.Color
- End Sub
- Private Sub CmdTickCaptionColor_Click()
- '
- ' Load the control with the current (or last selected) shapes
- ' FillColor
- '
- CMDialog1.Color = KNOB1.TickCaptionColor
- '
- ' Execute the color select dialog
- '
- CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
- CMDialog1.Action = DLG_COLOR
- '
- ' Assign the selected color to the shape's color properties
- '
- KNOB1.TickCaptionColor = CMDialog1.Color
- End Sub
- Private Sub CmdTickColor_Click()
- '
- ' Load the control with the current (or last selected) shapes
- ' FillColor
- '
- CMDialog1.Color = KNOB1.TickColor
- '
- ' Execute the color select dialog
- '
- CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
- CMDialog1.Action = DLG_COLOR
- '
- ' Assign the selected color to the shape's color properties
- '
- KNOB1.TickColor = CMDialog1.Color
- End Sub
- Private Sub Form_Load()
- ' Center the form on the screen
- Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
- KNOB1.TickCaptions = "Left" & Chr(10) & "Center" & Chr(10) & "Right"
- End Sub
- Private Sub HScrollBevelWidth_Change()
- KNOB1.BevelWidth = HScrollBevelWidth.Value
- End Sub
- Private Sub HScrollBevelWidth_Scroll()
- KNOB1.BevelWidth = HScrollBevelWidth.Value
- End Sub
- Private Sub HScrollIndicatorWidth_Change()
- KNOB1.IndicatorWidth = HScrollIndicatorWidth.Value
- End Sub
- Private Sub HScrollIndicatorWidth_Scroll()
- KNOB1.IndicatorWidth = HScrollIndicatorWidth.Value
- End Sub
- Private Sub HScrollRadius_Change()
- KNOB1.Radius = HScrollRadius.Value
- End Sub
- Private Sub HScrollRadius_Scroll()
- KNOB1.Radius = HScrollRadius.Value
- End Sub
- Private Sub HScrollTickGap_Change()
- KNOB1.TickGap = HScrollTickGap.Value
- End Sub
- Private Sub HScrollTickGap_Scroll()
- KNOB1.TickGap = HScrollTickGap.Value
- End Sub
- Private Sub HScrollTickLength_Change()
- KNOB1.TickLength = HScrollTickLength.Value
- End Sub
- Private Sub HScrollTickLength_Scroll()
- KNOB1.TickLength = HScrollTickLength.Value
- End Sub
- Private Sub HScrollTickWidth_Change()
- KNOB1.TickWidth = HScrollTickWidth.Value
- End Sub
- Private Sub HScrollTickWidth_Scroll()
- KNOB1.TickWidth = HScrollTickWidth.Value
- End Sub
- Private Sub OptionIndicator_Click(index As Integer)
- KNOB1.Indicator = index
- If index = 0 Then HScrollIndicatorWidth.Enabled = False Else HScrollIndicatorWidth.Enabled = True
- End Sub
- Private Sub OptionKnobStyle_Click(index As Integer)
- KNOB1.KnobStyle = index
- If index = 3 Then HScrollBevelWidth.Enabled = False Else HScrollBevelWidth.Enabled = True
- End Sub
-